import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxProportionLeavingPeoplePresentPieChart from "./index";

const meta = {
  title:
    "饼图/可信质量检查及整改数据统计饼图-KxProportionLeavingPeoplePresentPieChart",
  component: KxProportionLeavingPeoplePresentPieChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "354px", width: "549px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxProportionLeavingPeoplePresentPieChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    title: "安全检查总次数",
    dataSource: [
      {
        name: "合格",
        amount: 490,
      },
      {
        name: "整改中",
        amount: 200,
      },
      {
        name: "整改待复检",
        amount: 160,
      },
      {
        name: "逾期整改",
        amount: 100,
      },
      {
        name: "复检合格",
        amount: 50,
      },
    ],
    img: "https://test-ymsl.kxgcc.com:30195/cockpit/largescreen/leftTop.png",
  },
};

export const qua: Story = {
  args: {
    title: "质量检查总次数",
    dataSource: [
      {
        name: "合格",
        amount: 490,
      },
      {
        name: "整改中",
        amount: 200,
      },
      {
        name: "整改待复检",
        amount: 160,
      },
      {
        name: "逾期整改",
        amount: 100,
      },
      {
        name: "复检合格",
        amount: 50,
      },
    ],
    img: "https://test-ymsl.kxgcc.com:30195/cockpit/largescreen/leftTop.png",
  },
};
